<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script>
        window.hdjs = {};
        window.hdjs.base = '../';
        window.hdjs.uploader = 'php/uploader.php?';
        window.hdjs.filesLists = 'php/filesLists.php?';
    </script>
    <script src="../dist/static/requirejs/require.js"></script>
    <script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">
<buttoon class="btn btn-default" onclick="showmap()">打开地图</buttoon>
<script>
    require(['hdjs'])
    function showmap() {
        require(['hdjs'], function (hdjs) {
            hdjs.map('', function (res) {
                //返回值是数组
                console.log("地址:" + res.address + ";经度" + res.lng + ";纬度:" + res.lat);
            });
        });
    }
</script>

<buttoon class="btn btn-default" onclick="showmap()">显示上海市</buttoon>
<script>
    require(['hdjs'])
    function showmap() {
        require(['hdjs'], function (hdjs) {
            hdjs.map({lng:121.480237,lat:31.236305}, function (res) {
                //返回值是数组
                console.log("地址:" + res.address + ";经度" + res.lng + ";纬度:" + res.lat);
            });
        });
    }
</script>
</body>
</html>